<?php

namespace common\models\mdm;

use Yii;

/**
 * This is the model class for table "MDM_EMPLOYEE".
 *
 * @property string $PK_ORG
 * @property string $PK_GROUP
 * @property string $PK_ORG_V
 * @property string $PK_PERSONNEL
 * @property string $CREATOR
 * @property string $CREATIONTIME
 * @property string $MODIFIER
 * @property string $MODIFIEDTIME
 * @property string $VAPPROVEID
 * @property string $DAPPROVEDATE
 * @property string $VAPPROVENOTE
 * @property string $BILLCODE
 * @property integer $BILLSTATUS
 * @property string $TRANSTYPE
 * @property string $TRANSTYPEID
 * @property string $PK_BILLTYPE
 * @property string $PK_BUSITYPE
 * @property string $PK_DEF1
 * @property string $PK_DEF2
 * @property string $PK_DEF3
 * @property string $PK_DEF4
 * @property string $PK_DEF5
 * @property string $VVDEF1
 * @property string $VVDEF2
 * @property string $VVDEF3
 * @property string $VVDEF4
 * @property string $VVDEF5
 * @property string $VVDEF6
 * @property string $VVDEF7
 * @property string $VVDEF8
 * @property string $VVDEF9
 * @property string $VVDEF10
 * @property string $VVDEF11
 * @property string $VVDEF12
 * @property string $VVDEF13
 * @property string $VVDEF14
 * @property string $VVDEF15
 * @property integer $IDEF1
 * @property integer $IDEF2
 * @property integer $IDEF3
 * @property integer $IDEF4
 * @property integer $IDEF5
 * @property string $NDEF1
 * @property string $NDEF2
 * @property string $NDEF3
 * @property string $NDEF4
 * @property string $NDEF5
 * @property string $DDEF1
 * @property string $DDEF2
 * @property string $DDEF3
 * @property string $DDEF4
 * @property string $DDEF5
 * @property string $BDEF1
 * @property string $BDEF2
 * @property string $BDEF3
 * @property string $BDEF4
 * @property string $BDEF5
 * @property string $PRESONCODE
 * @property string $PERSONNAME
 * @property string $PERSONSEX
 * @property string $PERSONID
 * @property string $BIRTHDATE
 * @property string $PERSONDEPART
 * @property string $PERSONPOST
 * @property string $PERSONDUTY
 * @property string $PERSONRANK
 * @property string $ISNOTUSE
 * @property string $NOTUSEDATE
 * @property string $NOTUSEMAN
 * @property string $SSORG
 * @property string $TS
 * @property integer $DR
 */
class MdmEmployee extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'MDM_EMPLOYEE';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_mdm');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['PK_PERSONNEL'], 'required'],
            [['BILLSTATUS', 'IDEF1', 'IDEF2', 'IDEF3', 'IDEF4', 'IDEF5', 'DR'], 'integer'],
            [['NDEF1', 'NDEF2', 'NDEF3', 'NDEF4', 'NDEF5'], 'number'],
            [['PK_ORG', 'PK_GROUP', 'PK_ORG_V', 'PK_PERSONNEL', 'CREATOR', 'MODIFIER', 'VAPPROVEID', 'TRANSTYPE', 'PK_BILLTYPE', 'PK_BUSITYPE', 'PK_DEF1', 'PK_DEF2', 'PK_DEF3', 'PK_DEF4', 'PK_DEF5', 'PERSONDEPART', 'PERSONPOST', 'NOTUSEMAN', 'SSORG'], 'string', 'max' => 20],
            [['CREATIONTIME', 'MODIFIEDTIME', 'DAPPROVEDATE', 'DDEF1', 'DDEF2', 'DDEF3', 'DDEF4', 'DDEF5', 'BIRTHDATE', 'NOTUSEDATE', 'TS'], 'string', 'max' => 19],
            [['VAPPROVENOTE'], 'string', 'max' => 1024],
            [['BILLCODE', 'TRANSTYPEID', 'VVDEF1', 'VVDEF2', 'VVDEF3', 'VVDEF4', 'VVDEF5', 'VVDEF6', 'VVDEF7', 'VVDEF8', 'VVDEF9', 'VVDEF10', 'VVDEF11', 'VVDEF12', 'VVDEF13', 'VVDEF14', 'VVDEF15', 'PERSONDUTY', 'PERSONRANK'], 'string', 'max' => 100],
            [['BDEF1', 'BDEF2', 'BDEF3', 'BDEF4', 'BDEF5', 'ISNOTUSE'], 'string', 'max' => 1],
            [['PRESONCODE', 'PERSONNAME', 'PERSONSEX', 'PERSONID'], 'string', 'max' => 50],
            [['PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL'], 'unique', 'targetAttribute' => ['PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL', 'PK_PERSONNEL'], 'message' => 'The combination of  and Pk  Personnel has already been taken.'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'PK_ORG' => Yii::t('app', 'Pk  Org'),
            'PK_GROUP' => Yii::t('app', 'Pk  Group'),
            'PK_ORG_V' => Yii::t('app', 'Pk  Org  V'),
            'PK_PERSONNEL' => Yii::t('app', 'Pk  Personnel'),
            'CREATOR' => Yii::t('app', 'Creator'),
            'CREATIONTIME' => Yii::t('app', 'Creationtime'),
            'MODIFIER' => Yii::t('app', 'Modifier'),
            'MODIFIEDTIME' => Yii::t('app', 'Modifiedtime'),
            'VAPPROVEID' => Yii::t('app', 'Vapproveid'),
            'DAPPROVEDATE' => Yii::t('app', 'Dapprovedate'),
            'VAPPROVENOTE' => Yii::t('app', 'Vapprovenote'),
            'BILLCODE' => Yii::t('app', 'Billcode'),
            'BILLSTATUS' => Yii::t('app', 'Billstatus'),
            'TRANSTYPE' => Yii::t('app', 'Transtype'),
            'TRANSTYPEID' => Yii::t('app', 'Transtypeid'),
            'PK_BILLTYPE' => Yii::t('app', 'Pk  Billtype'),
            'PK_BUSITYPE' => Yii::t('app', 'Pk  Busitype'),
            'PK_DEF1' => Yii::t('app', 'Pk  Def1'),
            'PK_DEF2' => Yii::t('app', 'Pk  Def2'),
            'PK_DEF3' => Yii::t('app', 'Pk  Def3'),
            'PK_DEF4' => Yii::t('app', 'Pk  Def4'),
            'PK_DEF5' => Yii::t('app', 'Pk  Def5'),
            'VVDEF1' => Yii::t('app', 'Vvdef1'),
            'VVDEF2' => Yii::t('app', 'Vvdef2'),
            'VVDEF3' => Yii::t('app', 'Vvdef3'),
            'VVDEF4' => Yii::t('app', 'Vvdef4'),
            'VVDEF5' => Yii::t('app', 'Vvdef5'),
            'VVDEF6' => Yii::t('app', 'Vvdef6'),
            'VVDEF7' => Yii::t('app', 'Vvdef7'),
            'VVDEF8' => Yii::t('app', 'Vvdef8'),
            'VVDEF9' => Yii::t('app', 'Vvdef9'),
            'VVDEF10' => Yii::t('app', 'Vvdef10'),
            'VVDEF11' => Yii::t('app', 'Vvdef11'),
            'VVDEF12' => Yii::t('app', 'Vvdef12'),
            'VVDEF13' => Yii::t('app', 'Vvdef13'),
            'VVDEF14' => Yii::t('app', 'Vvdef14'),
            'VVDEF15' => Yii::t('app', 'Vvdef15'),
            'IDEF1' => Yii::t('app', 'Idef1'),
            'IDEF2' => Yii::t('app', 'Idef2'),
            'IDEF3' => Yii::t('app', 'Idef3'),
            'IDEF4' => Yii::t('app', 'Idef4'),
            'IDEF5' => Yii::t('app', 'Idef5'),
            'NDEF1' => Yii::t('app', 'Ndef1'),
            'NDEF2' => Yii::t('app', 'Ndef2'),
            'NDEF3' => Yii::t('app', 'Ndef3'),
            'NDEF4' => Yii::t('app', 'Ndef4'),
            'NDEF5' => Yii::t('app', 'Ndef5'),
            'DDEF1' => Yii::t('app', 'Ddef1'),
            'DDEF2' => Yii::t('app', 'Ddef2'),
            'DDEF3' => Yii::t('app', 'Ddef3'),
            'DDEF4' => Yii::t('app', 'Ddef4'),
            'DDEF5' => Yii::t('app', 'Ddef5'),
            'BDEF1' => Yii::t('app', 'Bdef1'),
            'BDEF2' => Yii::t('app', 'Bdef2'),
            'BDEF3' => Yii::t('app', 'Bdef3'),
            'BDEF4' => Yii::t('app', 'Bdef4'),
            'BDEF5' => Yii::t('app', 'Bdef5'),
            'PRESONCODE' => Yii::t('app', 'Presoncode'),
            'PERSONNAME' => Yii::t('app', 'Personname'),
            'PERSONSEX' => Yii::t('app', 'Personsex'),
            'PERSONID' => Yii::t('app', 'Personid'),
            'BIRTHDATE' => Yii::t('app', 'Birthdate'),
            'PERSONDEPART' => Yii::t('app', 'Persondepart'),
            'PERSONPOST' => Yii::t('app', 'Personpost'),
            'PERSONDUTY' => Yii::t('app', 'Personduty'),
            'PERSONRANK' => Yii::t('app', 'Personrank'),
            'ISNOTUSE' => Yii::t('app', 'Isnotuse'),
            'NOTUSEDATE' => Yii::t('app', 'Notusedate'),
            'NOTUSEMAN' => Yii::t('app', 'Notuseman'),
            'SSORG' => Yii::t('app', 'Ssorg'),
            'TS' => Yii::t('app', 'Ts'),
            'DR' => Yii::t('app', 'Dr'),
        ];
    }
}
